{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Scalar Fields: normals"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## [Run this notebook on binder](https://mybinder.org/v2/gh/daavoo/pyntcloud/master)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In this notebook we are going to learn about the avaliable scalar fields that require the normals of each point."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Imports"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from pyntcloud import PyntCloud"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "---"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Load ankylosaurus mesh"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We are going to load a 3D model of an ankylosaurus from the provided `examples/data.`\n",
    "\n",
    "You could load other point cloud in any of the supported [point cloud formats](http://pyntcloud.readthedocs.io/en/latest/io.html).\n",
    "\n",
    "You can learn more about reading and writing point clouds in the `examples/[io]` notebooks."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "PyntCloud\n",
       "34820 points with 6 scalar fields\n",
       "69636 faces in mesh\n",
       "0 kdtrees\n",
       "0 voxelgrids\n",
       "Centroid: 0.029972486197948456, 1.1250594854354858, 2.887650489807129\n",
       "Other attributes:"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "anky = PyntCloud.from_file(\"data/ankylosaurus_mesh.ply\")\n",
    "anky"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "From the description, we can see that this is a 3D mesh with 69636 faces. "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "---"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Visualization: Mesh"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "We can visualize the mesh with the `plot` method.\n",
    "\n",
    "Note that we are passing the argument `backend=\"threejs\"` because mesh visualziation is not currently supported with the default backend. \n",
    "\n",
    "Because of this, the visualization might don't work in some enviroments (i.e. binder). We are working to add support to mesh plotting with the default backend as soon as possible  in order to fix these issues."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "anky.plot(mesh=True, backend=\"threejs\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "![mesh](data/images/structures-voxelgrid-1.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "---"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Convert Mesh to Point Cloud using random sampling."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can now convert the mesh into a point cloud by sampling 100.000 random points from the surface.\n",
    "\n",
    "You cand learn more about hoy to convert a triangular mesh into a point cloud in the `examples/[sampling]` notebooks."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "anky_cloud = anky.get_sample(\n",
    "    \"mesh_random\", n=100000, rgb=True, normals=True, as_PyntCloud=True\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Note that we pass the `normals=True` argument so now our point cloud has normal values for each point:"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "---"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Visualization: Pandas built-in"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Because PyntCloud.points is a pandas.DataFrame, we can leverage the built-in [visualization options of pandas](https://pandas.pydata.org/pandas-docs/stable/visualization.html):"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAD8CAYAAAC/1zkdAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3X2QHXWd7/H3JyEwoIGQBDRmCBO2IhJRYhIedmWviG4ALZ6WVWF1CUHIAuGyrksVQS3DVbmLd93V5WqJaAUCliKISFzB7AAbuNbykARZkoiYANlwTIQwyDMhCXzvH/078TA5M9Nn5vSc6ZnPq+rUdP9OP3zSM5nvdP9+p1sRgZmZWTOManUAMzMbPlxUzMysaVxUzMysaVxUzMysaVxUzMysaVxUzMysaVxUzMysaVxUzMysaVxUzMysaXZrdYDBNnHixOjo6Gh1DDOz0li1atUzEbFfnmVHXFHp6Ohg5cqVrY5hZlYakv4777K+/GVmZk0z4s5UzOzNOhb+vGX73nDFR1u2byuGz1TMzKxpfKZiZtZE27dvp1KpsHXr1lZHaVhbWxvt7e2MGTOm39twUTEza6JKpcLYsWPp6OhAUqvj5BYRdHV1UalUmDp1ar+346JiNkS0sm/Dmmfr1q2lKygAkpgwYQJbtmwZ0HZy9alIOnRAezEzG0HKVlCqmpE7b0f9VZIekHSBpHED3quZmQ1LuS5/RcTRkqYBZwMrJT0AXBMRnYWmMzMruWZf1hzqw7BzDymOiHXAF4BLgA8AV0r6jaS/LCqcmZmVS64zFUnvBeYBHwU6gRMj4kFJ7wDuBX5SXEQzG65aNThhqP+1P1AbNmzghBNO4Oijj+Y///M/mTx5MjfffDPHHnss//RP/8QxxxzDpZdeyqhRo7j88subuu+8ZyrfBB4EDouIBRHxIEBEbCI7ezEzsyFk3bp1LFiwgLVr1zJu3DhuvfVWrr32Ws4//3w6Ozv5xS9+waJFi5q+37xDij8CvBoRrwNIGgW0RcQrE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2p1+CT/eyqY8Dt0TE9pptb06Tr0m6Brh4MHOly0tExOOSlgPvA26mxcdL0t7Az4EvpEsD1W33+3jV0dPPS71lKpJ2A/Yhu6SRZ90icyHpw2SF+gMR8Vq1vYfvaTN+SfaZKyK6ama/C3y1Zt1juq27vAmZcuWqcTqwoLahwOPVl55yF3KsfPmrf+reHiay3q//IOvPAJgL5DnzyWNp2l6e7e5yLTf9Yq32Y5wC1B0pUkQuSftWLx9Jmgi8H/h1q49X+t7dQna9+aZu7zXzeOW5nVBt3r8C7krHZylwurLRYVOBacBnebx1AAABV0lEQVQDA8jSUC5J7wO+A5wUEU/XtNf9ng5irkk1sycBj6TpZcCclG9fYA5vPmMvNFfKdjBZx/e9NW1FHq++LAXOTKPAjgKeT380FXOsihiNUOYXcCpZBX8NeApYltrfAdxWs9xHgN+S/aXx+Zr2g8j+068HbgL2aFKuCcCdwLr0dXxqnw18r2a5DuB3wKhu698FrCb75fh94K2DlQv4s7Tv/0pfPz0UjhfwKWA78FDNa0YRx6vezwvZ5bST0nRb+vevT8fjoJp1P5/WexQ4ock/733luiP9P6gen6V9fU8HKdc/AmvT/v8DeFfNumen47gemDeYudL8ZcAV3dYr7HiR/QG5Of0sV8j6vs4Dzkvvi+xhho+lfc+uWbfpx8qfqDczs6bx5S8zM2saFxUzM2saFxUzM2saFxUzM2saFxUzM2saFxUzM2saFxUzM2saFxUzM2ua/w+87PCtJowTawAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 3 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "anky_cloud.points[[\"nx\", \"ny\", \"nz\"]].plot(kind=\"hist\", subplots=True);"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "---"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Visualization: Point Cloud"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can visualize the sampled point cloud as follows:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "anky_cloud.plot()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "![anky_cloud](data/images/structures-voxelgrid-2.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "---"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Inclination (Degrees)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "$\\huge I_d = \\arccos (N_z) \\times \\frac{180}\\pi{}$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "inclination_degrees = anky_cloud.add_scalar_field(\"inclination_degrees\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAD8CAYAAAC/1zkdAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAGaJJREFUeJzt3X20XXV95/H3p0RQWxGQaFkJNMFGWnTpiLfKjNVpRSGgJdjRTljOkGWZZlRsdRynhjqruLSsBa2VllXFoqQCozyID2RGLEa0umYteQgP8iBirkDhCkI0PGhVaPQ7f5zfdY6Xc5OTsM8995L3a62zzt7f/dt7f/e+N/eb335MVSFJUhd+adwJSJKeOCwqkqTOWFQkSZ2xqEiSOmNRkSR1xqIiSeqMRUWS1BmLiiSpMxYVSVJnFo07gbm2//7717Jly8adhiQtKNdee+33qmrxjtrtdkVl2bJlbNq0adxpSNKCkuSfh2nn4S9JUmcsKpKkzlhUJEmdsahIkjpjUZEkdcaiIknqzMiKSpL1Se5PcvOM+B8nuS3JLUn+si9+cpLJ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ZokwB8AF8xVPrOxqPQsqMe9JFkGvBC4qoXe2g4trJ8Ph5SaAr6Q5Nr2RAOAZ1XVvdArksAzx5bdYKv5xX+U83G/TpttX8733+U/pNeTmrY8yfVJvpLkZeNKaoBBP/v5vG9fBtxXVZv7YmPZtxaVnqEe9zIfJPkV4FPA26vqYeAs4NnAvwHupdcFng9eWlWH0XuC9ElJXj7uhLan3Tx7LPDJFpqv+3VH5u3vcpJ3A9uAj7fQvcBBVfVC4B3AJ5LsPa78+sz2s5+3+xY4nl/8D9HY9q1FpWeox72MW5In0SsoH6+qTwNU1X1V9dOq+hnwEeawO749VXVP+74f+Ay9vO6bPhTTvu8fX4aPcTRwXVXdB/N3v/aZbV/Oy9/lJGuA1wBvqHbQvx1G+n4bvpbeOYrnjC/Lnu387Ofrvl0E/D5w0XRsnPvWotIz7x/30o6ZngPcWlUf6Iv3Hy9/LXDzzHnnWpJfTvK06WF6J2pvprdP17Rma4BLx5PhQL/wP735uF9nmG1fbgBOaFeBHQ48NH2YbFySrATeBRxbVT/qiy9O751IJDkYWAHcPp4s/7/t/Ow3AKuT7JVkOb18r57r/AZ4JfDNqpqaDox1347j6oD5+KF31cy36FX0d487nwH5/Ta9rvaNwA3tcwxwPnBTi28ADpgHuR5M7yqZrwO3TO9P4BnAFcDm9r3fuHNteT0V+D7w9L7YvNmv9IrdvcC/0vvf8omz7Ut6h2g+2H6PbwIm5kGuk/TORUz/3n64tf0P7ffj68B1wO/Nk307688eeHfbt7cBR4871xb/GPCmGW3Htm+9o16S1BkPf0mSOmNRkSR1xqIiSeqMRUWS1BmLiiSpMxYVSVJnLCqSpM5YVCRJnfl/ldrECmWecZsAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "anky_cloud.points[inclination_degrees].plot(kind=\"hist\");"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "anky_cloud.plot(use_as_color=inclination_degrees, cmap=\"jet\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "![inclination_degrees](data/images/scalar_fields-normals-1.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "---"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Inclination (Radians)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "$\\huge I_r = \\arccos (N_z)$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "inclination_radians = anky_cloud.add_scalar_field(\"inclination_radians\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAD8CAYAAAC/1zkdAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAGP5JREFUeJzt3X20XXV95/H3RyI+jCIoUVlJMLFNacGlI6ZIx2nHikLADqEzOBOWU6JDm6li1el0KthZpaOyFnYcaRkVi5IRGMuDaCVVLI2Idc1a8hABeZTmCoxcoRIND1oVJvidP87vOsebc3NPwj733Ju8X2vddff+7t8++/fjwP2wn1NVSJLUhaeMuwOSpD2HoSJJ6oyhIknqjKEiSeqMoSJJ6oyhIknqjKEiSeqMoSJJ6oyhIknqzKJxd2CuHXjggbV8+fJxd0OSFpSvfe1r362qxbO12+tCZfny5WzevHnc3ZCkBSXJ/xmmnYe/JEmdMVQkSZ0xVCRJnTFUJEmdMVQkSZ0xVCRJnRlZqCTZkOTBJLdNq/9ekruS3J7kT/vqpyeZaMuO6auvbrWJJKf11VckuS7JliSXJtl3VGORJA1nlHsqnwBW9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Ibp318Dy6vqpcAX+f//R7OQzPfvYVg3Ai+qqpcB/wP47Jj7M6MkzwI+Dbyzqh6dvnjAKvPy+5hlHAvi+6iqJ6rqn9J7WsgRSV4yrcm8+z721lAZ5vEuP22TZBHwHObX4Y1Zx1BV36uqx9rsx4BXzFHfujTUo3jmu6p6dOpQRvXurXpqkgPH3K0dJHkqvT/En6yqzwxosiC+j9nGsVC+jylV9TDwZWD1tEXz7u/U3hoqwzzeZSOwrk2fCHyp2tmweWLWMUw71n08vWPLC81G4OR21dGRwCNV9cC4O7Wrkrxw6lh3kiPo/bf3vfH26me1/p0P3FlVH5yh2bz/PoYZxwL5PhYn2b9NPwN4LfCNac3m3d+pBX9H/e6oGR7vkuQ9wOaq2kjvX8qLkkzQS/614+vxjoYcw9uTHA9spzeGN42twzNIcjG9K3EOTDIJnEHvhCRV9VF6T0s4DpgAfgi8eTw93bkhxnEi8JYk24EfAWvH/R//AK8Cfgu4tR3HB3g3cDAsqO9jmHEshO/jIOCC9F5G+BTgsqr63Hz/O+Ud9ZKkzuyth78kSSNgqEiSOmOoSJI6Y6hIkjpjqEiSOmOoSJI6Y6hIkjpjqEiSOvP/AGw5EnmvBD8hAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "anky_cloud.points[inclination_radians].plot(kind=\"hist\");"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "anky_cloud.plot(use_as_color=inclination_radians, cmap=\"jet\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "![inclination_radians](data/images/scalar_fields-normals-2.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "---"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Orientation (Degrees)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "$\\huge O_d = \\arctan (N_x, N_y) \\times \\frac{180}\\pi{}$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "orientation_degrees = anky_cloud.add_scalar_field(\"orientation_degrees\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAD8CAYAAAC/1zkdAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAGbBJREFUeJzt3X20XXV95/H3p0RQWzUg0TIJaUKb2qKrD2lUZmw7rbQQsGPoLJyJ0xmyHKaZsdiH6XQVqLOKo7KW9InK0uLQkgrWikhtyYxYGpHWNWvJQxTkUZpbYOAKNXECqLVCo9/5Y/+uHi/nJidhn3PuhfdrrbPO3t/922d/9w7hm71/v713qgpJkvrwbdNOQJL09GFRkST1xqIiSeqNRUWS1BuLiiSpNxYVSVJvLCqSpN5YVCRJvbGoSJJ6s2zaCUza0UcfXWvWrJl2GpK0pHzqU5/6QlWtOFC7Z1xRWbNmDTt37px2GpK0pCT5v6O08/KXJKk3FhVJUm8sKpKk3lhUJEm9sahIknpjUZEk9WZsRSXJtiS7k9wxL/6LSe5JcmeS3xqIn5tkpi07eSC+scVmkpwzEF+b5MYku5J8MMnh49oXSdJoxnmm8l5g42AgyU8Cm4AfqKqXAr/T4scDm4GXtnX+IMlhSQ4D3g2cAhwPvL61BbgAuLCq1gGPAGeOcV8kSSMYW1Gpqk8Ae+eF3wi8o6oeb212t/gm4Iqqeryq7gNmgFe0z0xV3VtVTwBXAJuSBHg1cFVb/zLgtHHtiyRpNJO+o/57gR9Lcj7wVeDXqupmYCVww0C72RYDeHBe/JXAC4FHq2rfkPZjs+ac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+949vQy/xUJ5LarjXFWfb3+Jvw78Id+8FDPVPJM8i+5/0u+vqg+38KI8psNyXazHteX2KPDXdH0Qy5PM3cc3mMs38mzLX8Dol077znNju8xYVfU48McsguNpUTmwRf0omCTfnuR5c9PAScAddDluac22AFdPJ8MnWSiv7cAZbdTKCcBjc5d0pmHe9eefpTum0OW5uY0CWgusA26aUE4BLgXurqrfG1i06I7pQrkutuOaZEWS5W36OcBP0fX/XA+c3prNP6Zzx/p04OPVesankOdnB/4xEbp+n8HjOZ2/T5MaEbCUP3QjKf6W7lrrm6edz7zcjqMbNfMZ4M65/Oiu814H7GrfR00htw/QXeL4J7p/OZ25UF50p+vvbsf4dmDDlPN8X8vjNrq/oMcMtH9zy/Me4JQJ5vmjdJcwbgNubZ9TF+kxXSjXRXVcgR8Abmn53AH8ZosfR1fUZoAPAUe0+LPb/ExbftyU8/x4O553AH/CN0eITe3P3jvqJUm98fKXJKk3FhVJUm8sKpKk3lhUJEm9sahIknpjUZEk9caiIknqjUVFktSb/w+jR7h230OVWAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "anky_cloud.points[orientation_degrees].plot(kind=\"hist\");"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "anky_cloud.plot(use_as_color=orientation_degrees, cmap=\"jet\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "![orientation_degrees](data/images/scalar_fields-normals-3.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "---"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Orientation (radians)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "$\\huge O_r = \\arctan (N_x, N_y)$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "orientation_radians = anky_cloud.add_scalar_field(\"orientation_radians\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAD8CAYAAAC/1zkdAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAGFxJREFUeJzt3X/wXXV95/HnSyIKVgxItGxCGmwjLTp1xYh02boWFIK6hO7oLqwtGZdtdi1aXbcjYHeWrsoM7LqijIpLIRWsEhG1ZCuKEbFuZ+RH+KH8XrLAwlfQxA0/RCs0+N4/7ufbXsP9JvebnPu9ueT5mLnzved9PueezxkHXznn8znnpKqQJKkLzxp3ByRJzxyGiiSpM4aKJKkzhookqTOGiiSpM4aKJKkzhookqTOGiiSpM4aKJKkz88bdgbm2//7715IlS8bdDUmaKDfccMOPqmrB9trtdqGyZMkS1q9fP+5uSNJESfJ/h2nn5S9JUmcMFUlSZwwVSVJnDBVJUmcMFUlSZwwVSVJnRhYqSVYn2Zjk1q3q70pyV5LbkvzXvvrpSTa0dcf01Ze32oYkp/XVD0pybZK7k3w+yZ6jOhZJ0nBGeabyaWB5fyHJ7wArgN+sqpcBH271Q4ATgJe1bT6ZZI8kewCfAI4FDgFObG0BzgbOqaqlwMPAySM8FknSEEYWKlX1bWDzVuV3AGdV1ROtzcZWXwGsqaonqupeYANwWPtsqKp7qupJYA2wIkmAI4HL2vYXAceP6lgkScOZ6zvqXwr8dpIzgZ8Bf1xV1wMLgWv62k21GsADW9VfA7wQeKSqtgxoPzJLTvvKqHcx0H1nvWks+5Wk2ZrrUJkH7AscDrwauDTJS4AMaFsMPpOqbbQfKMkqYBXA4sWLZ9llSdKw5nr21xTwpeq5Dvg5sH+rH9jXbhHw4DbqPw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4O1j7s/TOKVYktQZL39JkjpjqEiSOmOoSJI6Y6hIkjpjqEiSOmOoSJI6Y6hIkjpjqEiSOvP/AV0WaKYHu+B4AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "anky_cloud.points[orientation_radians].plot(kind=\"hist\");"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "anky_cloud.plot(use_as_color=orientation_radians, cmap=\"jet\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "![orientation_radians](data/images/scalar_fields-normals-4.png)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
